package edu.ncsu.monopoly;

public abstract class Cell implements IOwnable {
        private String name;
        protected Player theOwner;
        private boolean available = true;

        /* (non-Javadoc)
         * @see edu.ncsu.monopoly.IOwnable#getName()
         */
        @Override
        public String getName() {
                return name;
        }

        /* (non-Javadoc)
         * @see edu.ncsu.monopoly.IOwnable#getTheOwner()
         */
        @Override
        public Player getTheOwner() {
                return theOwner;
        }
        
        /* (non-Javadoc)
         * @see edu.ncsu.monopoly.IOwnable#getPrice()
         */
        @Override
        public int getPrice() {
                return 0;
        }

        public abstract Boolean playAction(String msg);

        void setName(String name) {
                this.name = name;
        }

        public void setTheOwner(Player owner) {
                this.theOwner = owner;
        }
    
    public String toString() {
        return name;
    }

        /* (non-Javadoc)
         * @see edu.ncsu.monopoly.IOwnable#isAvailable()
         */
        @Override
        public boolean isAvailable() {
                return available;
        }

        public void setAvailable(boolean available) {
                this.available = available;
        }
}